package ace.cmp.security.oauth2.resource.server.test.core.service.impl;

import ace.cmp.security.oauth2.resource.server.test.core.service.BookService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;

/**
 * @author caspar
 * @date 2023/9/5 9:44
 */
@Slf4j
@Component
public class BookServiceImpl implements BookService {
  @PreAuthorize("hasAuthority('write')")
  public void add() {
    log.info("book success");
  }
}
